#ifndef WEATHERDIALOG_H
#define WEATHERDIALOG_H

#include <QDialog>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>

#include <QXmlStreamReader>
#include <QStringList>
#include <QTextcodec>
#include <QEventLoop>

namespace Ui {
class WeatherDialog;
}

class WeatherDialog : public QDialog
{
    Q_OBJECT

public:
    explicit WeatherDialog(QWidget *parent = 0);
    ~WeatherDialog();

protected:
    void init();

private slots:
    void replyDataFinished(QNetworkReply * np);
    void provinceSlot(QString data);
    void searchWeatherSlot();
    void on_back_clicked();

private:
    Ui::WeatherDialog *ui;
    QNetworkAccessManager *m_nam;
    QEventLoop m_eventLoop;
    int m_choose;
    QStringList m_recvList;
    QString m_strIcon;


};

#endif // WEATHERDIALOG_H
